package com.cmwa.scbp.business.myHome.todo.service;

import java.util.List;

import com.cmwa.scbp.base.mvc.entity.Page;
import com.cmwa.scbp.base.mvc.entity.Result;
import com.cmwa.scbp.base.mvc.entity.SearchParam;
import com.cmwa.scbp.business.myHome.todo.entity.OverviewData;
import com.cmwa.scbp.business.myHome.todo.entity.TodoBizRelVo;
import com.cmwa.scbp.business.myHome.todo.entity.TodoVo;

/**
 * 待办表业务接口层
 * 
 * @author ex-zuotc
 * @date 2019-01-30 18:23:07
 */
public interface TodoService {

	public void insertTodo(TodoVo todo);

	public void physicDeleteTodoById(String id);

	public void logicDeleteTodoById(String id);

	public void updateTodoById(TodoVo todo);

	public Page<TodoVo> todoListPage(SearchParam sp);

	public TodoVo getTodoById(String id);

	/**
	 * 查询待办及产出数数据
	 * 
	 * @return
	 */
	public List<OverviewData> getOverviewData();

	/**
	 * 保存
	 * 
	 * @param todoVo
	 * @param attIds
	 *            TODO
	 * @param operType
	 *            TODO
	 * @param confirmResult
	 *            TODO
	 * @param opinion
	 *            TODO
	 */
	public void save(TodoVo todoVo, String attIds, String fileEndAttId, String attachJson, String operType,
			String confirmResult, String opinion);

	public List<TodoVo> queryList(TodoVo todoVo);

	public Page<TodoVo> toUploadListPage(SearchParam param);

	/**
	 * 无文件上传
	 * 
	 * @param id
	 */
	public void noFileUpload(String id);

	public int queryTodoCount();

	public List<TodoBizRelVo> queryRelVoByBiz(String bizType, String bizId);

	List<TodoVo> queryTodoOutFiles(String ids);

	public List<TodoVo> queryTodoInputFiles(String ids);

	/**
	 * 供业务模块校验是否有材料或产出
	 * 
	 * @param bizType
	 * @param bizId
	 * @param fileType
	 * @return
	 */
	Result<Object> validateExistsFile(String bizType, String bizId, String fileType);

	/**
	 * 删除待办
	 * 
	 * @param id
	 */
	public void deleteTodo(String id);

	/**
	 * 待办状态后台校验
	 * 
	 * @param todoId
	 * @param operType
	 *            TODO
	 */
	void checkTodoStatus(String todoId, String operType);

	public List<TodoVo> listAllTodo();
}
